Reseter{
	var target, tempo = 2, clock;
	
	*new{
		^super.new.init;
	}
	
	init{
		clock = TempoClock.new(this.getTempo);
	}
	
	setTarget{|targetArg|
		target = targetArg; 
	}
	
	setBpm{|bpmArg|
		tempo = bpmArg / 60;
		clock.tempo = tempo;	
	}
	
	getTempo{
		^tempo;
	}
	
	start{
		var f;
		f = {
			clock.sched(1, 
				{
					target.reset;
					f.value;
				}
			);
		};
		f.value;
	}
	
}

/*
ReseterTest.test
*/

ReseterTest{
	*test{
		var r;
		
		r = Reseter.new.setBpm(100).setTarget(this).start;
	}	
	
	*reset{
		"resetting".postln;
	}
}